﻿using System;
using System.Collections.Generic;
using Orchard.UI.Navigation;
using Orchard.Environment.Extensions;
using FruitCake.ContactPage.Models;

namespace FruitCake.ContactPage.ViewModels
{
    [OrchardFeature("FruitCake.ContactPage")]
    public class ContactRequestsViewModel
    {
        public ContactRequestsViewModel()
        {
            Options = new RequestListOptions();
        }

        public IEnumerable<Models.ContactRequestRecord> Requests { get; set; }
        public dynamic PagerShape { get; set; }
        public RequestListOptions Options { get; private set; }
    }

    public class RequestListOptions
    {
        public RequestListOptions()
        {
            StateFilter = RequestStateFilter.None;
            OrderBy = RequestsOrder.RequestDate;            
        }

        public RequestStateFilter StateFilter { get; set; }
        public RequestsOrder OrderBy { get; set; }
        public RequestAdminAction BulkAction { get; set; }

    }
}